"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".

Replace these with more appropriate tests for your application.
"""

from django.test import TestCase
from goplay.sinaweibo.models import UserInfo
import unittest

class SimpleTest(TestCase):
    def test_basic_addition(self):
        """
        Tests that 1 + 1 always equals 2.
        """
        self.failUnlessEqual(1 + 1, 2)

class UserinfoTest(unittest.TestCase):
    def setUp(self):
        self.tony=UserInfo.objects.create(username='tony',province='44',city='3',profile_image='http://localhost:8000/usericon/avatar_male.png',gender='male')
    def testUserinfo(self):
        self.assertEqual(self.tony,'this is tony')

__test__ = {"doctest": """
Another way to test that 1 + 1 is equal to 2.

>>> 1 + 1 == 2
True
"""}

